<html>
<!-- Totals: set total attribute for certain fields and define .total class for total row styling.
 Available total functions: sum, max, min, avg, count(*)
-->
<style>
 {{{defaultstyle}}}
 @page {size: A4; margin: 30mm 3mm 10mm 3mm;}
 body {margin: 20px 20px; }
 table {box-shadow: 5px 5px 10px #777; }
 h2 {color: #666; }
 td, th {
   border: solid #eee 1px;
   font-size: 12px;
   padding: 2 2;
   overflow: hidden;
  }
 th {
   background: #888;
   color: white;
   padding: 5px 5px;
   resize: horizontal;
   draggable: true;
  }
 .total {
   background: #888;
   color: white;
   font-weight: bold
  }
 .table-group-box {background: #888; border: solid #white 1px; padding: 3 5; margin: 5 0; color: white;  }
 .group {background: #8a8; font-weight: bold; font-size: 16px; color: white}
 .selected {background: lime}
 .barcode {width: 100px; height: 30px; margin: 5 5;}
 .qrcode {margin: 10px}
 .pageheader {width: 100%; border-bottom: solid #aaa 1px; text-align: center; font-size: 10px; margin-left: 20px; margin-top: 10px}
 .pagefooter {width: 100%; border-top: solid #aaa 1px; text-align: center; font-size: 10px; padding: 5px 5px;}
</style>

<script type="passcript">
$('tr').On('click', 'this.toggleclass(''selected'')');
</script>

<report-params>
 <param name="state" caption="State" type="list" template=" and state=:state_value" sql="select distinct state, state from customer"/>
 <param name="company" caption="Company" type="string" template=" and company starting with :company_value"/>
</report-params>

<div class="pageheader">
 Page header <span class="page"/>
</div>

<div class="pagefooter">
 Page footer
</div>


<h2>Customer list</h2>
<qrcode width="100" code="http://delphihtmlcomponents.com"/>
<div class="table-group-box">Drag a column header here to group by that column</div>
<DATAPACKET>
 <METADATA autosort="true">
  <FIELDS>
   <FIELD name="CUSTNO" caption="No" total="Total"/>
   <FIELD name="ADDR1" caption="Address" total="count(*)"/>
   <FIELD name="COMPANY" caption="Company" />
   <FIELD name="CITY" caption="City"/>
   <FIELD name="STATE" caption="State"/>
   <FIELD name="PHONE" caption="Phone"/>
   <FIELD name="CONTACT" caption="Contact"/>
   <FIELD name="BAR" caption="Barcode" width="100">
    <template-cell>
      <barcode class=barcode height=20 width=50 code="{{CUSTNO}}"/>
    </template-cell>
   </FIELD>
  </FIELDS>
  <SQL>
   select * from customer
   where (1=1)  {{state}} {{company}}
  </SQL>
 </METADATA>
</DATAPACKET>


</html>
